import request from '@/utils/request'
// 获取经纪管理列表
export function getBorker(params) {
  return request({
    url: '/agents',
    params
  })
}
// 获取数量
export function getBorkerCount() {
  return request({
    url: '/agents/count'
  })
}
// 添加经纪
export function addBorker(data) {
  return request({
    url: '/agents',
    data,
    method: 'post'
  })
}
// 根据id获取经纪
export function getBorkerById(id) {
  return request({
    url: '/agents/' + id

  })
}
// 编辑经纪
export function editBorker(data) {
  return request({
    url: '/agents/' + data.id,
    method: 'put',
    data
  })
}
// 删除经纪
export function delBorker(id) {
  return request({
    url: '/agents/' + id,
    method: 'delete'
  })
}
